package com.tg.service.event;

import org.springframework.context.ApplicationListener;
import org.springframework.core.Ordered;
import org.springframework.stereotype.Component;

/**
 * Created by linzc on 2018/9/19.
 */
@Component
public class MessageEventListenerA implements ApplicationListener<MessageEvent>, Ordered {

    @Override
    public int getOrder() {
        return 9;
    }

    @Override
    public void onApplicationEvent(MessageEvent messageEvent) {
//        try {
////            Thread.sleep(10000);
//        } catch (InterruptedException e) {
//            e.printStackTrace();
//        }
        System.out.println("A:i got messageEvent:" + messageEvent);
    }
}



